import request from '@/utils/request'
import qs from "qs"

export default{



    // 根据id查询数据

    listById(id){


        return request({
            url:'/api-operate/activity/listById',
            method:"get",
            params:{id}
            
            
                    })
    },

    // 获取数据列表（带筛选和排序）

    getList(pageNum, pageSize,title,status,sort){


        return request({
            url:'/api-operate/activity/getList',
            method:"get",
            params:{pageNum, pageSize,title,status,sort}
            
            
                    })

    },

    // 更新一条数据
    updateOne(activity){

        var data=qs.stringify(activity);

        return request({
            url:'/api-operate/activity/updateOne',
            method:"post",
            data


        })


    },

      // 添加一条数据
      addOne(activity){

        var data=qs.stringify(activity);

        return request({
            url:'/api-operate/activity/addOne',
            method:"post",
            data


        })


    },



    // 删除数据
    deleteList(ids){

var da=qs.stringify({ids});

return request({
    url:'/api-operate/activity/deleteList',
    method:"delete",
     data:da
    
    
            })  


    }



}